import {Pipe, PipeTransform} from "@angular/core";
/**
 * Created by Administrator on 2017/3/28.
 */
@Pipe({name: 'intBooleanType'})
export class IntBooleanTypePipe implements PipeTransform {
    transform(value: any,index:number): string {
        let result:string =""
        if(index==0){
            if(value==0){
                result='<span class="label label-warning">未归还</span>'
            }
            if(value==1){
                result='<span class="label label-info">已归还</span>'
            }
        }
        return result
    }


    types: any =[
        [
            {name: "是", value: true},
            {name: "否", value: false},
        ],
        [
            {name: "通过", value: true},
            {name: "不通过", value: false},
        ],
    ]



}